import request from "@/utils/request";

// 查询故障知识库列表
export function listKnowledge(query) {
  return request({
    url: "/equipment/knowledge/list",
    method: "get",
    params: query,
  });
}

// 新增设备类型
export function addKnowledge(data) {
  return request({
    url: "/equipment/knowledge",
    method: "post",
    data: data,
  });
}

// 查询设备类型信息详细
export function getKnowledge(faultTypeId) {
  return request({
    url: "/equipment/knowledge/" + faultTypeId,
    method: "get",
  });
}

// 修改设备类型
export function updateKnowledge(data) {
  return request({
    url: "/equipment/knowledge",
    method: "put",
    data: data,
  });
}

// 删除设备类型
export function delKnowledge(faultTypeIds) {
  return request({
    url: "/equipment/knowledge/" + faultTypeIds,
    method: "delete",
  });
}
